<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>更新日志</title>
<jsp:include page="../head.jsp" />
<script type="text/javascript" src="<%=path %>/js/ueditor/editor_all_min.js"></script>
<script type="text/javascript" src="<%=path %>/js/ueditor/editor_config.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/ueditor/themes/default/ueditor.css" />
<script type="text/javascript">
	var totalEditor;
	$(function(){
		var editor = new baidu.editor.ui.Editor({
	        allHtmlEnabled:true
		});
		editor.render('baiduEditor');
		totalEditor=editor;
	});
	function save(){
		$("#updateLogContent").val(totalEditor.getContent());
		if(trim($("#updateLogContent").val())==""){
			addError("updateLogContent","更新内容.");
			return;
		}
		xbox.load("loading");	
		$("#saveForm").ajaxSubmit(function(){
			$("#refreshForm").submit();
	    });
	}

</script>

</head>
<body>
<form action="<%=path%>/updatelog/updatelogAjax_modify_msgAction.action" method="post" id="saveForm">
<table width="98%" align="center" border="0" cellpadding="4" cellspacing="1" bgcolor="#F1F1F1" style="margin-bottom:8px">
  <tr bgcolor="#FFFFFF">
    <td colspan="4" height="16"><span></span></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="10%" align="right" bgcolor="#FFFFFF">更新内容：</td>
    <td width="90%" colspan="3" align="left" bgcolor="#FFFFFF">
              <textarea rows="5"  id="baiduEditor"><c:out value="${updateLog.updateLogContent}"></c:out></textarea>
    </td>
  </tr>
  <tr align="right" bgcolor="#F1F1F1">
	<td height="36" colspan="4" align="center">
		<input type='button' class="btn btn-primary" id="btnSave" onclick="save();" value='发布更新内容' />
	</td>
</tr>
</table>
<input name="updateLog.updateLogContent" type="hidden" id="updateLogContent" />
<input type="hidden" name="updateLog.updateLogVersion" value="${updateLog.updateLogVersion }"/>
<input type="hidden" name="updateLog.updateTime" value="${updateLog.updateTime }"/>
<input type="hidden" name="updateLog.updateLogId" value="${updateLog.updateLogId }"/>
</form>

	<form action="<%=path%>/updatelog/updatelog_queryList_showAction.action" method="post" style="display: none;" id="refreshForm" name="refreshForm">
		<input type="hidden" name="currentPage" class="currentPage" value="${currentPage}"/>
		<input type="hidden" class="currentMenuId" name="currentMenuId" value="${currentMenuId}"/>
	</form>
	

</body>
</html>
